You can display the results of this method in the user interface by forming an association between a control and the method. That way, whenever a new studio is selected or when a selected studio's movie revenues change, its portfolio value is dynamically recalculated and displayed.
Display the Attributes view of the Inspector for the Studio EODisplayGroup.
Add the name of the method ( portfolioValue ) you want to use in an association.
Drag three text fields from the Views palette.
Make them the same size and align them in a column.
Add labels (as shown at right) to each text field.
Justify the fields' contents (as shown).
Control-drag from the Revenue text field to the Studio EODisplayGroup.
In the Connections Inspector, choose EOControlAssoc from the pop-up list at the top of the left column.
Select value in the left column.
In the right column select the method ( portfolioValue ) you want to associate with the control.
Double-click portfolioValue to connect.
Repeat the above steps, connecting the Name field to Studio's name attribute and the Budget field to the budget attribute.
Select the text field, and display the Formatter view of the NSTextField Inspector. Change the format as shown.
(See " Building and Testing Your Application " for details.)